
--[[
	消息处理

--]]



---------------------------------------------------------
-- class
---------------------------------------------------------
local M = class("Handler")

function M:ctor()
    self.timer = new("timer")
    self:register()
end

function M:register()
    g.register("send_user", handler(self, self.onSendUser))
    g.register("update_best_cards", handler(self, self.onUpdateBestCards))
    g.register("add_game_round", handler(self, self.onAddGameRound))

end

function M:onStart()

end

function M:onSendUser(uid, cmd, ...)
    if not uid or not cmd then return end
    local robot = g.manager:getRobot(uid)
    if not robot or not robot.tb_callback[cmd] then return end
    robot.tb_callback[cmd](...)
end

function M:onUpdateBestCards(uid, cmd, ...)
    return
end

function M:onAddGameRound(uid, cmd, ...)
    return
end




return M
